package com.aiyige.page.interest.searchinterest.adapter;

import android.support.annotation.Nullable;
import android.view.View;
import android.widget.TextView;

import com.aiyige.R;
import com.aiyige.page.interest.model.Interest;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.LinkedList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class HistoryAdapter extends BaseQuickAdapter<Interest, HistoryAdapter.VH> {

    public HistoryAdapter() {
        super(R.layout.history_search_interest_item, new LinkedList<Interest>());
    }

    @Override
    protected void convert(VH helper, Interest item) {
        helper.bindData(item);
    }

    public class VH extends BaseViewHolder {
        @BindView(R.id.titleTv)
        TextView titleTv;
        Interest data;

        public VH(View view) {
            super(view);
            ButterKnife.bind(this, view);
        }

        public void bindData(Interest item) {
            data = item;
            titleTv.setText(item.getTitle());
        }
    }

}
